adding granularity#11
Open
MikeLippincott wants to merge 1 commit intoWayScience:mainfrom
Open
Conversation
Member
|
Are any of these test for granualrity? I'm not seeing any passing test, so if there is a granularity test it either isn't running or it failed |
MattsonCam
reviewed
Apr 21, 2026
Member
MattsonCam
left a comment
There was a problem hiding this comment.
LGTM @MikeLippincott , good job! I left a few comments
Member
There was a problem hiding this comment.
Consider splitting this into helpers such as “subsample”, “background removal”, and “per-object measurement” to make review and future debugging easier
Comment on lines
+114
to
+116
| assert result["object_id"] == [1, 1, 1] | ||
| assert result["feature"] == [1, 2, 3] | ||
| assert len(result["value"]) == EXPECTED_THREE_SCALES |
Member
There was a problem hiding this comment.
It looks like the tests validate shape/length and other integer values. Consider adding a test for numerical correctness of granularity if possible (e.g. my granularity calculation measure the expected granularity calculation)
MattsonCam
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds granularity modules. Note that this might fail tests due to not having a key piece of image-loading code that is in another PR.
What kind of change(s) are included?
Checklist
Please ensure that all boxes are checked before indicating that this pull request is ready for review.